$prefix-cls: '#{$tonyname}-layout-header';

.#{$prefix-cls} {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0;
  line-height: var(--header-height);
  color: var(--header-text-color);
  background-color: var(--header-background-color);

  &--mobile {
    .error-action,
    .notify-item,
    .fullscreen-item {
      display: none;
    }

    .#{$tonyname}-app-logo {
      min-width: unset;
      padding-right: 0;

      &__title {
        display: none;
      }
    }

    .#{$prefix-cls}-action {
      padding-right: 4px;
    }
  }

  &--fixed {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
  }

  &-logo {
    min-width: 200px;
    height: var(--header-height);
    padding: 0 10px;
    font-size: 14px;

    > span {
      font-size: 24px;
    }
  }

  &-left {
    display: flex;
    align-items: center;
    height: 100%;

    .#{$prefix-cls}-trigger {
      display: flex;
      align-items: center;
      height: 80%;
      padding: 0 10px;
      cursor: pointer;

      &:hover {
        background-color: var(--header-background-hover-color);
      }

      svg {
        width: 24px;
        height: 24px;
      }
    }
  }

  &-menu {
    flex: 1;
    align-items: center;
    min-width: 0;
    height: 100%;
  }

  &-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 180px;

    &__item {
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: var(--header-height);
      max-width: calc(var(--header-height) * 3);
      height: calc(var(--header-height) * 0.8);
      padding: 0;
      margin-right: 4px;
      font-size: 1.2em;
      color: inherit;
      cursor: pointer;

      &:hover {
        background: var(--header-background-hover-color);
      }

      > span.el-tooltip__trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;

        svg {
          width: 1em;
          height: 1em;
        }
      }

      .el-dropdown {
        width: 100%;
        height: 100%;
      }

      .el-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;

        &__content {
          position: absolute;
          top: 8px;
          right: 8px;
          height: auto;
          padding: 2px 4px;
          font-size: 12px;
          line-height: 1;
          border: none;
          transform: none;
        }

        &__content.is-dot {
          top: 12px;
          right: 12px;
          width: 6px;
          height: 6px;
          padding: 0;
        }
      }
    }
  }
}
